// components/project-item-tb/indexd.js
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    item: {
      type: Object,
      value: {},
    },
    // rpx 值
    imageH: {
      type: Number,
      value: 330
    },
    titleOverflowNum: {
      type: Number,
      value: 2
    },
    showDeleteIcon: {
      type: Boolean,
      value: false
    },
    isScrollX: {
      type: Boolean,
      value: false
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    itemDetail(e){
      console.log('详情', e);
      const {item} = e.currentTarget.dataset
      this.triggerEvent('detial', item)
    },
    addItem(e){
      console.log('添加', e);
      const {item} = e.currentTarget.dataset
      this.triggerEvent('add', item)
    },
    deleteItem(e){
      console.log('删除', e);
      const {item} = e.currentTarget.dataset
      this.triggerEvent('del', item)
    },
  }
})